#!/bin/bash
modpath="/lib/modules/"$(uname -r)"/extra/"
if [ ! -d $modpath ];then
mkdir $modpath
chmod -R 755 $modpath
echo "mkdir $modpath"
fi

cp ./bin/socs.ko     /lib/modules/$(uname -r)/extra/socs.ko -f
cp ./bin/socs        /opt/reyzar/bin/socs -f
chmod 755 /opt/reyzar/bin/socs
cp socs.sh        /opt/reyzar/services/socs -f
chmod 755 /opt/reyzar/services/socs
ln -s /opt/reyzar/services/socs /etc/init.d/socs
cp socs.conf   /opt/reyzar/conf/socs.conf -f
echo 'install success'